package com.feihong.txgw.inter.contract.order;

import com.feihong.txgw.json.user.ProductOrderDetailEntity;
import com.feihong.txgw.ui.mvp.model.IBaseModel;
import com.feihong.txgw.ui.mvp.precenter.AbBasePrecenter;
import com.feihong.txgw.ui.mvp.view.IBaseActivity;

import java.util.List;

import io.reactivex.Observable;

/**
 * @Author wangziheng
 * @ProjectName txgw_app
 * @ClassName IReviewOrderContract
 * @package com.feihong.txgw.inter.contract.order
 * @data 2018/5/7 13:33
 * @Describe
 * @Change
 */
public interface IReviewOrderContract {

    interface IReviewOrderMainModel extends IBaseModel{

        /**
         * 获取终端订单详情
         * @param tableID
         * @param orderID
         * @return
         */
        Observable<String> getOrderGoodsInfo(String tableID, String orderID);

        /**
         * 提交评论
         * @param orderSn
         * @param type
         * @param delivery_rand
         * @param serviceRand
         * @param goodsInfo
         * @return
         */
        Observable submitReview(String orderSn,String type,String delivery_rand,String serviceRand,String goodsInfo);
    }

    interface IReviewOrderMainView extends IBaseActivity{

        void getOrderGoodsError();

        void getOrderGoodsResult(List<ProductOrderDetailEntity> orderGoods);

        void submitOrderReviewResult();

        void submitOrderReviewError();
    }

    abstract class AbReviewOrderMainPrecenter extends AbBasePrecenter<IReviewOrderMainModel,IReviewOrderMainView>{

        public abstract void loadOrderGoodsInfo(String tableID,String orderID);

        public abstract void submitOrderReview(String orderSn,String type,String delivery_rand,String serviceRand,String goodsInfo);
    }
}
